package com.sunset.ai

import org.slf4j.Logger
import org.slf4j.LoggerFactory

/**
 * @projectName: ai-demo
 * @description:
 * @author: helinlin
 * @date: 2025/3/3
 */
val <T> T.log: Logger get() = LoggerFactory.getLogger(this!!::class.java)
val <T> T.logger: Logger get() = LoggerFactory.getLogger(this!!::class.java)

fun Boolean.ifTrue(block: () -> Unit) = apply { if (this) block() }

fun Boolean.ifFalse(block: () -> Unit) = apply { if (!this) block() }